<template>
  <el-input-number
    v-if="typeof(value) == 'number'"
    :value="value"
    @input="onInput"
    :controls="false"/>
  <el-switch
    v-else-if="typeof(value) == 'boolean'"
    :value="value"
    @input="onInput"
    active-text="True"
    inactive-text="False"/>
  <el-input
    v-else-if="typeof(value) == 'string'"
    :value="value"
    @input="onInput"/>
  <div v-else>{{ value }}</div>
</template>

<script>
export default {
  props: ['value'],
  methods: {
    onInput(v) {
      this.$emit('input', v)
    }
  }
}
</script>
